Code
import numpy as np
import pandas as pd
import json
import folium
from branca.colormap import linear
print('folium version: ', folium.__version__)folium version: 0.13.0
October 27, 2022
pet data shape: (729, 14)
| ์๊ตฐ๋ช | ์๋ฉด๋๋ช | ๋ฑ๋ก๋๋ฌผ์(๋ง๋ฆฌ) | (๋ฑ๋ก์ฃผ์ฒด)์๊ตฐ๊ตฌ๋ฑ๋ก | (๋ฑ๋ก์ฃผ์ฒด)๋ํ์ ์ฒด๋ฑ๋ก | (๋ฑ๋ก์ฃผ์ฒด)๊ธฐํ | (RFID์ข ๋ฅ)๋ด์ฅํ | (RFID์ข ๋ฅ)์ธ์ฅํ | (RFID์ข ๋ฅ)์ธ์ํ | ๋ฑ๋กํ์ข ์ | ๋ฑ๋ก์์ ์์ | ๋๋ฌผ์์ ์๋น๋ฑ๋ก๋๋ฌผ์ | ํด๋น๋์๋ฑ๋ก๋ํ์ ์ฒด์ | ๋ฐ์ดํฐ๊ธฐ์ค์ผ์ | |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 0 | ๊ฐํ๊ตฐ | ๊ฐํ์ | 941 | NaN | NaN | NaN | 596 | 294 | 51 | NaN | 85.0 | NaN | 3.0 | 2022-06-14 |
| 1 | ๊ฐํ๊ตฐ | ๋ถ๋ฉด | 289 | NaN | NaN | NaN | 176 | 93 | 20 | NaN | 185.0 | NaN | 0.0 | 2022-06-14 |
๋ฐ์ดํฐ ์์ง ๊ธฐ๊ฐ: [2022 2020 2021]
์ ์ฒด ์ปฌ๋ผ๋ช
: Index(['์๊ตฐ๋ช
', '์๋ฉด๋๋ช
', '๋ฑ๋ก๋๋ฌผ์(๋ง๋ฆฌ)', '(๋ฑ๋ก์ฃผ์ฒด)์๊ตฐ๊ตฌ๋ฑ๋ก', '(๋ฑ๋ก์ฃผ์ฒด)๋ํ์
์ฒด๋ฑ๋ก', '(๋ฑ๋ก์ฃผ์ฒด)๊ธฐํ',
'(RFID์ข
๋ฅ)๋ด์ฅํ', '(RFID์ข
๋ฅ)์ธ์ฅํ', '(RFID์ข
๋ฅ)์ธ์ํ', '๋ฑ๋กํ์ข
์', '๋ฑ๋ก์์ ์์',
'๋๋ฌผ์์ ์๋น๋ฑ๋ก๋๋ฌผ์', 'ํด๋น๋์๋ฑ๋ก๋ํ์
์ฒด์', '๋ฐ์ดํฐ๊ธฐ์ค์ผ์'],
dtype='object')
์ฌ์ฉํ ์ปฌ๋ผ๋ง ๊ณจ๋ผ ๋ฐ์ดํฐํ๋ ์์ ๋ฎ์ด ์์
| ์๊ตฐ๋ช | ์๋ฉด๋๋ช | ๋ฑ๋ก๋๋ฌผ์(๋ง๋ฆฌ) | ๋ฑ๋ก์์ ์์ | |
|---|---|---|---|---|
| 0 | ๊ฐํ๊ตฐ | ๊ฐํ์ | 941 | 85.0 |
| 1 | ๊ฐํ๊ตฐ | ๋ถ๋ฉด | 289 | 185.0 |
| 2 | ๊ฐํ๊ตฐ | ์๋ฉด | 399 | 243.0 |
| 3 | ๊ฐํ๊ตฐ | ์ค์ ๋ฉด | 1111 | 625.0 |
| 4 | ๊ฐํ๊ตฐ | ์กฐ์ข ๋ฉด | 416 | 274.0 |
์๊ตฐ๋ช
0
์๋ฉด๋๋ช
2
๋ฑ๋ก๋๋ฌผ์(๋ง๋ฆฌ) 0
๋ฑ๋ก์์ ์์ 1
dtype: int64
์ ์ฒด ์๋ฉด๋ ๊ฐ์: 675
['๊ฐํ๊ตฐ' '๊ณ ์์' '๊ณผ์ฒ์' '๊ด๋ช
์' '๊ด์ฃผ์' '๊ตฌ๋ฆฌ์' '๊ตฐํฌ์' '๊นํฌ์' '๋จ์์ฃผ์' '๋๋์ฒ์' '๋ถ์ฒ์' '์ฑ๋จ์'
'์์์' '์ํฅ์' '์์ฐ์' '์์ฑ์' '์์์' '์์ฃผ์' '์ํ๊ตฐ' '์ฌ์ฃผ์' '์ฐ์ฒ๊ตฐ' '์ค์ฐ์' '์ฉ์ธ์' '์์์'
'์์ ๋ถ์' '์ด์ฒ์' 'ํ์ฃผ์' 'ํํ์' 'ํฌ์ฒ์' 'ํ๋จ์' 'ํ์ฑ์']
์๊ตฐ ๊ฐ์: 31
| ์๊ตฐ๋ช | ๋ฑ๋ก๋๋ฌผ์(๋ง๋ฆฌ) | ๋ฑ๋ก์์ ์์ | |
|---|---|---|---|
| 0 | ๊ฐํ๊ตฐ | 4017 | 2006.0 |
| 1 | ๊ณ ์์ | 73477 | 54580.0 |
| 2 | ๊ณผ์ฒ์ | 2974 | 2325.0 |
| 3 | ๊ด๋ช ์ | 20161 | 15698.0 |
| 4 | ๊ด์ฃผ์ | 29042 | 19368.0 |
pet_graph = pet_num.sort_values('๋ฑ๋ก๋๋ฌผ์(๋ง๋ฆฌ)')
fig, ax = plt.subplots(figsize=(10,7))
barh = ax.barh(pet_graph['์๊ตฐ๋ช
'], pet_graph['๋ฑ๋ก๋๋ฌผ์(๋ง๋ฆฌ)'])
ax.bar_label(barh, labels=[f'{x:,.0f}' for x in barh.datavalues])
ax.set_xlim(right=130000) # x์ถ ์ต๋๊ฐ ์ค์ . ์ค์ ํ์ง ์์ผ๋ฉด ๋ถ์ฒ์ ์ซ์๊ฐ์ด ํ
๋๋ฆฌ ๋ฐ์ผ๋ก ํ์ด๋์ด
plt.show()
Rectangle(xy=(0, -0.4), width=2020, height=0.8, angle=0)
Rectangle(xy=(0, 0.6), width=2974, height=0.8, angle=0)
Rectangle(xy=(0, 1.6), width=4017, height=0.8, angle=0)
Rectangle(xy=(0, 2.6), width=5252, height=0.8, angle=0)
Rectangle(xy=(0, 3.6), width=6590, height=0.8, angle=0)
Rectangle(xy=(0, 4.6), width=6998, height=0.8, angle=0)
Rectangle(xy=(0, 5.6), width=7912, height=0.8, angle=0)
Rectangle(xy=(0, 6.6), width=11168, height=0.8, angle=0)
Rectangle(xy=(0, 7.6), width=11848, height=0.8, angle=0)
Rectangle(xy=(0, 8.6), width=12381, height=0.8, angle=0)
Rectangle(xy=(0, 9.6), width=13147, height=0.8, angle=0)
Rectangle(xy=(0, 10.6), width=13291, height=0.8, angle=0)
Rectangle(xy=(0, 11.6), width=14471, height=0.8, angle=0)
Rectangle(xy=(0, 12.6), width=15480, height=0.8, angle=0)
Rectangle(xy=(0, 13.6), width=17634, height=0.8, angle=0)
Rectangle(xy=(0, 14.6), width=19950, height=0.8, angle=0)
Rectangle(xy=(0, 15.6), width=20161, height=0.8, angle=0)
Rectangle(xy=(0, 16.6), width=24057, height=0.8, angle=0)
Rectangle(xy=(0, 17.6), width=29042, height=0.8, angle=0)
Rectangle(xy=(0, 18.6), width=30539, height=0.8, angle=0)
Rectangle(xy=(0, 19.6), width=35644, height=0.8, angle=0)
Rectangle(xy=(0, 20.6), width=42957, height=0.8, angle=0)
Rectangle(xy=(0, 21.6), width=48264, height=0.8, angle=0)
Rectangle(xy=(0, 22.6), width=50227, height=0.8, angle=0)
Rectangle(xy=(0, 23.6), width=55728, height=0.8, angle=0)
Rectangle(xy=(0, 24.6), width=58997, height=0.8, angle=0)
Rectangle(xy=(0, 25.6), width=60468, height=0.8, angle=0)
Rectangle(xy=(0, 26.6), width=65330, height=0.8, angle=0)
Rectangle(xy=(0, 27.6), width=73477, height=0.8, angle=0)
Rectangle(xy=(0, 28.6), width=86158, height=0.8, angle=0)
Rectangle(xy=(0, 29.6), width=113892, height=0.8, angle=0)
pet_graph = pet_num.sort_values('๋ฑ๋ก๋๋ฌผ์(๋ง๋ฆฌ)', ascending=False)
fig, ax = plt.subplots(figsize=(15,7))
bar = ax.bar(pet_graph['์๊ตฐ๋ช
'], pet_graph['๋ฑ๋ก๋๋ฌผ์(๋ง๋ฆฌ)'])
ax.bar_label(bar, labels=[f'{x:,.0f}' for x in bar.datavalues]) # ๋ง๋๊ทธ๋ํ ๊ฐ์ 30๋๋ก ๋๋ฆฌ๋ ๋ฐฉ๋ฒ์???
plt.setp(ax.get_xticklabels(), rotation=30) # x์ถ ๋ ์ด๋ธ 30๋๋ก ๋๋ฆฌ๊ธฐ
plt.show()
| ์ง๊ณ์ผ์ | ์๊ตฐ๋ช | ๊ตฌ๋ถ๋ช | ์ ํ๋ฒํธ์๋ด | ์์ฌ์ง์ฐํธ๋ฒํธ | ์์ฌ์ง๋๋ก๋ช ์ฃผ์ | ์์ฌ์ง์ง๋ฒ์ฃผ์ | WGS84์๋ | WGS84๊ฒฝ๋ | |
|---|---|---|---|---|---|---|---|---|---|
| 0 | 2022-05-06 | ๊ด๋ช ์ | ์ฒ ์ฐ2๋ | 02-2680-6609 | 14215 | ๊ฒฝ๊ธฐ๋ ๊ด๋ช ์ ์์ฒญ๋ก 61 | ๊ฒฝ๊ธฐ๋ ๊ด๋ช ์ ์ฒ ์ฐ๋ 160-4๋ฒ์ง | 37.484689 | 126.866622 |
| 1 | 2022-05-06 | ๊ด๋ช ์ | ์ผ์ง๋ | 02-2680-5800 | 14345 | ๊ฒฝ๊ธฐ๋ ๊ด๋ช ์ ์์ง๋ก 19 6์ธต | ๊ฒฝ๊ธฐ๋ ๊ด๋ช ์ ์ผ์ง๋ 512-3๋ฒ์ง 6์ธต | 37.418938 | 126.882693 |
| 2 | 2022-04-16 | ์ค์ฐ์ | ๋จ์ด๋ํ์ ๋ณต์ง์ผํฐ | 031-8036-6260 | 18119 | ๊ฒฝ๊ธฐ๋ ์ค์ฐ์ ์ฒญํ๋ก 55-5 (์ฒญํ๋) | ๊ฒฝ๊ธฐ๋ ์ค์ฐ์ ์ฒญํ๋ 16-6 | 37.154587 | 127.063455 |
Index(['์๊ตฐ๋ช
_x', '๋ฑ๋ก๋๋ฌผ์(๋ง๋ฆฌ)', '๋ฑ๋ก์์ ์์', '๊ด๊ณต์', '์ง๊ณ์ผ์', '์๊ตฐ๋ช
_y', '๊ตฌ๋ถ๋ช
', '์ ํ๋ฒํธ์๋ด',
'์์ฌ์ง์ฐํธ๋ฒํธ', '์์ฌ์ง๋๋ก๋ช
์ฃผ์', '์์ฌ์ง์ง๋ฒ์ฃผ์', 'WGS84์๋', 'WGS84๊ฒฝ๋'],
dtype='object')
| ์๊ตฐ๋ช _x | ๋ฑ๋ก๋๋ฌผ์(๋ง๋ฆฌ) | ๋ฑ๋ก์์ ์์ | ๊ด๊ณต์ | WGS84์๋ | WGS84๊ฒฝ๋ | |
|---|---|---|---|---|---|---|
| 0 | ๊ฐํ๊ตฐ | 4017 | 2006.0 | ๊ฐํ๊ตฐ์ฒญ | 37.831318 | 127.509706 |
| 1 | ๊ณ ์์ | 73477 | 54580.0 | ๊ณ ์์์ฒญ | 37.658422 | 126.831964 |
| 2 | ๊ณผ์ฒ์ | 2974 | 2325.0 | ๊ณผ์ฒ์์ฒญ | 37.429812 | 126.986963 |
| 3 | ๊ด๋ช ์ | 20161 | 15698.0 | ๊ด๋ช ์์ฒญ | 37.479097 | 126.864846 |
| 4 | ๊ด์ฃผ์ | 29042 | 19368.0 | ๊ด์ฃผ์์ฒญ | 37.429433 | 127.255084 |
์๊ตฐ๋ช
_x 0
๋ฑ๋ก๋๋ฌผ์(๋ง๋ฆฌ) 0
๋ฑ๋ก์์ ์์ 0
๊ด๊ณต์ 0
WGS84์๋ 3
WGS84๊ฒฝ๋ 3
dtype: int64
| ์๊ตฐ๋ช _x | ๋ฑ๋ก๋๋ฌผ์(๋ง๋ฆฌ) | ๋ฑ๋ก์์ ์์ | ๊ด๊ณต์ | WGS84์๋ | WGS84๊ฒฝ๋ | |
|---|---|---|---|---|---|---|
| 8 | ๋จ์์ฃผ์ | 42957 | 31542.0 | ๋จ์์ฃผ์์ฒญ | NaN | NaN |
| 10 | ๋ถ์ฒ์ | 113892 | 86532.0 | ๋ถ์ฒ์์ฒญ | NaN | NaN |
| 30 | ํ์ฑ์ | 48264 | 35496.0 | ํ์ฑ์์ฒญ | NaN | NaN |
| ์๊ตฐ๋ช | ๋ฑ๋ก๋๋ฌผ์ | ๋ฑ๋ก์์ ์์ | ๊ด๊ณต์ | ์๋ | ๊ฒฝ๋ | |
|---|---|---|---|---|---|---|
| 0 | ๊ฐํ๊ตฐ | 4017 | 2006.0 | ๊ฐํ๊ตฐ์ฒญ | 37.831318 | 127.509706 |
| 1 | ๊ณ ์์ | 73477 | 54580.0 | ๊ณ ์์์ฒญ | 37.658422 | 126.831964 |
| 2 | ๊ณผ์ฒ์ | 2974 | 2325.0 | ๊ณผ์ฒ์์ฒญ | 37.429812 | 126.986963 |
| 3 | ๊ด๋ช ์ | 20161 | 15698.0 | ๊ด๋ช ์์ฒญ | 37.479097 | 126.864846 |
| 4 | ๊ด์ฃผ์ | 29042 | 19368.0 | ๊ด์ฃผ์์ฒญ | 37.429433 | 127.255084 |
<class 'pandas.core.frame.DataFrame'>
RangeIndex: 107486 entries, 0 to 107485
Data columns (total 40 columns):
# Column Non-Null Count Dtype
--- ------ -------------- -----
0 ์ฐ๋ 107486 non-null int64
1 ์ 107486 non-null int64
2 ํ์ ๊ตฌ์ญ๊ตฌ๋ถ๋ช
107486 non-null object
3 ํ์ ๊ตฌ์ญ๋ช
107486 non-null object
4 ์ด ์ธ๊ตฌ์ 107486 non-null int64
5 0~9์ธ 107486 non-null int64
6 10~19์ธ 107486 non-null int64
7 20~29์ธ 107486 non-null int64
8 30~39์ธ 107486 non-null int64
9 40~49์ธ 107486 non-null int64
10 50~59์ธ 107486 non-null int64
11 60~69์ธ 107486 non-null int64
12 70~79์ธ 107486 non-null int64
13 80~89์ธ 107486 non-null int64
14 90~99์ธ 107486 non-null int64
15 100์ธ ์ด์ 107486 non-null int64
16 ์ด ์ธ๊ตฌ์ (๋จ) 107486 non-null int64
17 0~9์ธ (๋จ) 107486 non-null int64
18 10~19์ธ (๋จ) 107486 non-null int64
19 20~29์ธ (๋จ) 107486 non-null int64
20 30~39์ธ (๋จ) 107486 non-null int64
21 40~49์ธ (๋จ) 107486 non-null int64
22 50~59์ธ (๋จ) 107486 non-null int64
23 60~69์ธ (๋จ) 107486 non-null int64
24 70~79์ธ (๋จ) 107486 non-null int64
25 80~89์ธ (๋จ) 107486 non-null int64
26 90~99์ธ (๋จ) 107486 non-null int64
27 100์ธ ์ด์ (๋จ) 107486 non-null int64
28 ์ด ์ธ๊ตฌ์ (์ฌ) 107486 non-null int64
29 0~9์ธ (์ฌ) 107486 non-null int64
30 10~19์ธ (์ฌ) 107486 non-null int64
31 20~29์ธ (์ฌ) 107486 non-null int64
32 30~39์ธ (์ฌ) 107486 non-null int64
33 40~49์ธ (์ฌ) 107486 non-null int64
34 50~59์ธ (์ฌ) 107486 non-null int64
35 60~69์ธ (์ฌ) 107486 non-null int64
36 70~79์ธ (์ฌ) 107486 non-null int64
37 80~89์ธ (์ฌ) 107486 non-null int64
38 90~99์ธ (์ฌ) 107486 non-null int64
39 100์ธ ์ด์ (์ฌ) 107486 non-null int64
dtypes: int64(38), object(2)
memory usage: 32.8+ MB
| ํ์ ๊ตฌ์ญ๋ช | ์ด ์ธ๊ตฌ์ | |
|---|---|---|
| 0 | ๊ฒฝ๊ธฐ๋ | 13574353 |
| 1 | ๊ฒฝ๊ธฐ๋ ๊ฐํ๊ตฐ | 62168 |
| 2 | ๊ฒฝ๊ธฐ๋ ๊ฐํ๊ตฐ ๊ฐํ์ | 19532 |
| 3 | ๊ฒฝ๊ธฐ๋ ๊ฐํ๊ตฐ ๋ถ๋ฉด | 3821 |
| 4 | ๊ฒฝ๊ธฐ๋ ๊ฐํ๊ตฐ ์๋ฉด | 5688 |
| ํ์ ๊ตฌ์ญ๋ช | ์ด ์ธ๊ตฌ์ | |
|---|---|---|
| 1 | ๊ฒฝ๊ธฐ๋ ๊ฐํ๊ตฐ | 62168 |
| 2 | ๊ฒฝ๊ธฐ๋ ๊ฐํ๊ตฐ ๊ฐํ์ | 19532 |
| 3 | ๊ฒฝ๊ธฐ๋ ๊ฐํ๊ตฐ ๋ถ๋ฉด | 3821 |
์ด ์ธ๊ตฌ์๊ฐ 0์ธ ํ ๊ฐ์: 5
ํ๋ก์ ํธ๊ฐ ๋๋๊ณ ๋ค์ ๋ณด๋ค ์๋ชป ์ฒ๋ฆฌํ ๊ฑธ ๋ฐ๊ฒฌํจ. ์๊ตฐ๊ตฌ ๋ฐ์ดํฐ๊ฐ ์๋ ์๋ฉด๋ ๋ฐ์ดํฐ๋ฅผ ํฌํจํ๊ณ ์๋ ๊ฒ์ ๊ฐ๊ณผํ๊ณ ๋ชจ๋ ํฉํจ ์ฆ, ์ธ๊ตฌ๊ฐ 2๋ฐฐ๊ฐ ๋จ
| ํ์ ๊ตฌ์ญ๋ช | ์ด ์ธ๊ตฌ์ | |
|---|---|---|
| 1 | ๊ฒฝ๊ธฐ๋ ๊ฐํ๊ตฐ | 62168 |
| 8 | ๊ฒฝ๊ธฐ๋ ๊ณ ์์ | 1079277 |
| 56 | ๊ฒฝ๊ธฐ๋ ๊ณผ์ฒ์ | 78301 |
| 63 | ๊ฒฝ๊ธฐ๋ ๊ด๋ช ์ | 290756 |
| 83 | ๊ฒฝ๊ธฐ๋ ๊ด์ฃผ์ | 388893 |
| 97 | ๊ฒฝ๊ธฐ๋ ๊ตฌ๋ฆฌ์ | 191011 |
| 106 | ๊ฒฝ๊ธฐ๋ ๊ตฐํฌ์ | 267493 |
| 119 | ๊ฒฝ๊ธฐ๋ ๊นํฌ์ | 485609 |
| 134 | ๊ฒฝ๊ธฐ๋ ๋จ์์ฃผ์ | 734642 |
| 153 | ๊ฒฝ๊ธฐ๋ ๋๋์ฒ์ | 93260 |
| 162 | ๊ฒฝ๊ธฐ๋ ๋ถ์ฒ์ | 801503 |
| 173 | ๊ฒฝ๊ธฐ๋ ์ฑ๋จ์ | 928267 |
| 228 | ๊ฒฝ๊ธฐ๋ ์์์ | 1188234 |
| 277 | ๊ฒฝ๊ธฐ๋ ์ํฅ์ | 512721 |
| 297 | ๊ฒฝ๊ธฐ๋ ์์ฐ์ | 650708 |
| 325 | ๊ฒฝ๊ธฐ๋ ์์ฑ์ | 189772 |
| 341 | ๊ฒฝ๊ธฐ๋ ์์์ | 549724 |
| 376 | ๊ฒฝ๊ธฐ๋ ์์ฃผ์ | 236142 |
| 388 | ๊ฒฝ๊ธฐ๋ ์ํ๊ตฐ | 121789 |
| 401 | ๊ฒฝ๊ธฐ๋ ์ฌ์ฃผ์ | 112410 |
| 414 | ๊ฒฝ๊ธฐ๋ ์ฐ์ฒ๊ตฐ | 42731 |
| 425 | ๊ฒฝ๊ธฐ๋ ์ค์ฐ์ | 230028 |
| 432 | ๊ฒฝ๊ธฐ๋ ์ฉ์ธ์ | 1075877 |
| 474 | ๊ฒฝ๊ธฐ๋ ์์์ | 162137 |
| 481 | ๊ฒฝ๊ธฐ๋ ์์ ๋ถ์ | 464358 |
| 496 | ๊ฒฝ๊ธฐ๋ ์ด์ฒ์ | 222722 |
| 511 | ๊ฒฝ๊ธฐ๋ ํ์ฃผ์ | 486515 |
| 529 | ๊ฒฝ๊ธฐ๋ ํํ์ | 569369 |
| 555 | ๊ฒฝ๊ธฐ๋ ํฌ์ฒ์ | 148469 |
| 571 | ๊ฒฝ๊ธฐ๋ ํ๋จ์ | 323558 |
| 586 | ๊ฒฝ๊ธฐ๋ ํ์ฑ์ | 892038 |
| ์๊ตฐ๋ช | ๋ฑ๋ก๋๋ฌผ์ | ๋ฑ๋ก์์ ์์ | ๊ด๊ณต์ | ์๋ | ๊ฒฝ๋ | ํ์ ๊ตฌ์ญ๋ช | ์ด ์ธ๊ตฌ์ | |
|---|---|---|---|---|---|---|---|---|
| 0 | ๊ฐํ๊ตฐ | 4017 | 2006.0 | ๊ฐํ๊ตฐ์ฒญ | 37.831318 | 127.509706 | ๊ฐํ๊ตฐ | 62168 |
| 1 | ๊ณ ์์ | 73477 | 54580.0 | ๊ณ ์์์ฒญ | 37.658422 | 126.831964 | ๊ณ ์์ | 1079277 |
| 2 | ๊ณผ์ฒ์ | 2974 | 2325.0 | ๊ณผ์ฒ์์ฒญ | 37.429812 | 126.986963 | ๊ณผ์ฒ์ | 78301 |
| 3 | ๊ด๋ช ์ | 20161 | 15698.0 | ๊ด๋ช ์์ฒญ | 37.479097 | 126.864846 | ๊ด๋ช ์ | 290756 |
| 4 | ๊ด์ฃผ์ | 29042 | 19368.0 | ๊ด์ฃผ์์ฒญ | 37.429433 | 127.255084 | ๊ด์ฃผ์ | 388893 |
| ์๊ตฐ๋ช | ๋ฑ๋ก๋๋ฌผ์ | ๋ฑ๋ก์์ ์์ | ๊ด๊ณต์ | ์๋ | ๊ฒฝ๋ | ์ด ์ธ๊ตฌ์ | |
|---|---|---|---|---|---|---|---|
| 0 | ๊ฐํ๊ตฐ | 4017 | 2006.0 | ๊ฐํ๊ตฐ์ฒญ | 37.831318 | 127.509706 | 62168 |
| 1 | ๊ณ ์์ | 73477 | 54580.0 | ๊ณ ์์์ฒญ | 37.658422 | 126.831964 | 1079277 |
| 2 | ๊ณผ์ฒ์ | 2974 | 2325.0 | ๊ณผ์ฒ์์ฒญ | 37.429812 | 126.986963 | 78301 |
| 3 | ๊ด๋ช ์ | 20161 | 15698.0 | ๊ด๋ช ์์ฒญ | 37.479097 | 126.864846 | 290756 |
| 4 | ๊ด์ฃผ์ | 29042 | 19368.0 | ๊ด์ฃผ์์ฒญ | 37.429433 | 127.255084 | 388893 |
0 0.064615
1 0.068080
2 0.037982
3 0.069340
4 0.074679
5 0.064818
6 0.057871
7 0.016293
8 0.058473
9 0.075038
10 0.142098
11 0.060034
12 0.054981
13 0.059563
14 0.132407
15 0.105126
16 0.064840
17 0.050173
18 0.109131
19 0.046722
20 0.047272
21 0.062910
22 0.046685
23 0.040645
24 0.127051
25 0.059029
26 0.049448
27 0.106202
28 0.075221
29 0.054500
30 0.054105
dtype: float64
| ์๊ตฐ๋ช | ๋ฑ๋ก๋๋ฌผ์ | ๋ฑ๋ก์์ ์์ | ๊ด๊ณต์ | ์๋ | ๊ฒฝ๋ | ์ด ์ธ๊ตฌ์ | 1000๋ช ๋น๋ง๋ฆฌ์ | |
|---|---|---|---|---|---|---|---|---|
| 10 | ๋ถ์ฒ์ | 113892 | 86532.0 | ๋ถ์ฒ์์ฒญ | 37.502902 | 126.765889 | 801503 | 142.10 |
| 14 | ์์ฐ์ | 86158 | 64634.0 | ์์ฐ์์ฒญ | 37.322131 | 126.830243 | 650708 | 132.41 |
| 24 | ์์ ๋ถ์ | 58997 | 0.0 | ์์ ๋ถ์์ฒญ | 37.738063 | 127.033840 | 464358 | 127.05 |
| 18 | ์ํ๊ตฐ | 13291 | 7308.0 | ์ํ๊ตฐ์ฒญ | 37.491741 | 127.487682 | 121789 | 109.13 |
| 27 | ํํ์ | 60468 | 43718.0 | ํํ์์ฒญ | 36.992300 | 127.112527 | 569369 | 106.20 |
| ์๊ตฐ๋ช | ๋ฑ๋ก๋๋ฌผ์ | ๋ฑ๋ก์์ ์์ | ๊ด๊ณต์ | ์๋ | ๊ฒฝ๋ | ์ด ์ธ๊ตฌ์ | 1000๋ช ๋น๋ง๋ฆฌ์ | 1์์ ์๋น๋ง๋ฆฌ์ | |
|---|---|---|---|---|---|---|---|---|---|
| 24 | ์์ ๋ถ์ | 58997 | 0.0 | ์์ ๋ถ์์ฒญ | 37.738063 | 127.033840 | 464358 | 127.05 | inf |
| 0 | ๊ฐํ๊ตฐ | 4017 | 2006.0 | ๊ฐํ๊ตฐ์ฒญ | 37.831318 | 127.509706 | 62168 | 64.62 | 2.00 |
| 28 | ํฌ์ฒ์ | 11168 | 5719.0 | ํฌ์ฒ์์ฒญ | 37.894701 | 127.200341 | 148469 | 75.22 | 1.95 |
| 18 | ์ํ๊ตฐ | 13291 | 7308.0 | ์ํ๊ตฐ์ฒญ | 37.491741 | 127.487682 | 121789 | 109.13 | 1.82 |
| 19 | ์ฌ์ฃผ์ | 5252 | 3365.0 | ์ฌ์ฃผ์์ฒญ | 37.298214 | 127.636623 | 112410 | 46.72 | 1.56 |
petall_graph = df.sort_values('๋ฑ๋ก๋๋ฌผ์')
pet_graph = df.sort_values('1000๋ช
๋น๋ง๋ฆฌ์')
fig, ax = plt.subplots(nrows=1, ncols=2, figsize=(20,10))
ax[0].barh(petall_graph['์๊ตฐ๋ช
'], petall_graph['๋ฑ๋ก๋๋ฌผ์'])
ax[0].set_title('๋ฑ๋ก ๋ฐ๋ ค๋๋ฌผ์')
ax[1].barh(pet_graph['์๊ตฐ๋ช
'], pet_graph['1000๋ช
๋น๋ง๋ฆฌ์'])
ax[1].set_title('1000๋ช
๋น ๋ง๋ฆฌ์')
plt.show()
m = folium.Map(
location = [37.528043, 126.980238],
zoom_start = 8)
lat = list(df['์๋'])
long = list(df['๊ฒฝ๋'])
name = list(df['๋ฑ๋ก๋๋ฌผ์'])
si = list(df['์๊ตฐ๋ช
'])
for i in range(len(lat)):
folium.Marker(
[lat[i], long[i]], tooltip=f'<b>{si[i]}</b><br>๋ฐ๋ ค๋๋ฌผ์: {str(name[i])}',
icon=folium.Icon(color='red')
).add_to(m)
geo_data = json.load(open('data/kyeong.geojson'))
folium.Choropleth(
geo_data = geo_data,
data = df,
columns= ['์๊ตฐ๋ช
', '๋ฑ๋ก๋๋ฌผ์'],
key_on = 'feature.properties.sggnm',
fill_color = 'Reds',
fill_opacity = 0.7,
line_opacity = 0.4,
legend_name = '์๊ตฐ๋ณ ๋ฑ๋ก ๋ฐ๋ ค๋๋ฌผ์(๋ง๋ฆฌ))'
).add_to(m)
folium.LayerControl().add_to(m)
mm = folium.Map(
location = [37.528043, 126.980238],
zoom_start = 8)
lat = list(df['์๋'])
long = list(df['๊ฒฝ๋'])
name = list(df['๋ฑ๋ก๋๋ฌผ์'])
si = list(df['์๊ตฐ๋ช
'])
for i in range(len(lat)):
folium.Marker(
[lat[i], long[i]], tooltip=f'<b>{si[i]}</b><br>1000๋ช
๋น ๋ฐ๋ ค๋๋ฌผ์: {str(name[i])}',
icon=folium.Icon(color='red')
).add_to(m)
geo_data = json.load(open('data/kyeong.geojson'))
folium.Choropleth(
geo_data = geo_data,
data = df,
columns= ['์๊ตฐ๋ช
', '1000๋ช
๋น๋ง๋ฆฌ์'],
key_on = 'feature.properties.sggnm',
fill_color = 'Reds',
fill_opacity = 0.7,
line_opacity = 0.4,
legend_name = '์ธ๊ตฌ 1000๋ช
๋น ๋ฑ๋ก ๋ฐ๋ ค๋๋ฌผ ์(๋ง๋ฆฌ))'
).add_to(m)
folium.LayerControl().add_to(m)
m| ์ฐ๋ | ์ | ํ์ ๊ตฌ์ญ๊ตฌ๋ถ๋ช | ํ์ ๊ตฌ์ญ๋ช | ๋จ์ ํ๊ท ์ฐ๋ น | ์ฌ์ ํ๊ท ์ฐ๋ น | ํ๊ท ์ฐ๋ น | |
|---|---|---|---|---|---|---|---|
| 0 | 2022 | 9 | ๋ | ๊ฒฝ๊ธฐ๋ | 41.4 | 43.2 | 42.3 |
| 1 | 2022 | 9 | ์๊ตฐ | ๊ฒฝ๊ธฐ๋ ๊ฐํ๊ตฐ | 49.1 | 51.6 | 50.3 |
| 2 | 2022 | 9 | ์๋ฉด๋ | ๊ฒฝ๊ธฐ๋ ๊ฐํ๊ตฐ ๊ฐํ์ | 46.9 | 49.7 | 48.3 |
| 3 | 2022 | 9 | ์๋ฉด๋ | ๊ฒฝ๊ธฐ๋ ๊ฐํ๊ตฐ ๋ถ๋ฉด | 55.0 | 57.9 | 56.4 |
| 4 | 2022 | 9 | ์๋ฉด๋ | ๊ฒฝ๊ธฐ๋ ๊ฐํ๊ตฐ ์๋ฉด | 52.8 | 56.9 | 54.7 |
์ฐ๋ 0
์ 0
ํ์ ๊ตฌ์ญ๊ตฌ๋ถ๋ช
0
ํ์ ๊ตฌ์ญ๋ช
0
๋จ์ ํ๊ท ์ฐ๋ น 0
์ฌ์ ํ๊ท ์ฐ๋ น 0
ํ๊ท ์ฐ๋ น 0
dtype: int64
| ํ์ ๊ตฌ์ญ๋ช | ํ๊ท ์ฐ๋ น | ๋จ์ ํ๊ท ์ฐ๋ น | ์ฌ์ ํ๊ท ์ฐ๋ น | |
|---|---|---|---|---|
| 0 | ๊ฒฝ๊ธฐ๋ | 42.3 | 41.4 | 43.2 |
| 1 | ๊ฒฝ๊ธฐ๋ ๊ฐํ๊ตฐ | 50.3 | 49.1 | 51.6 |
| 2 | ๊ฒฝ๊ธฐ๋ ๊ฐํ๊ตฐ ๊ฐํ์ | 48.3 | 46.9 | 49.7 |
| 3 | ๊ฒฝ๊ธฐ๋ ๊ฐํ๊ตฐ ๋ถ๋ฉด | 56.4 | 55.0 | 57.9 |
| 4 | ๊ฒฝ๊ธฐ๋ ๊ฐํ๊ตฐ ์๋ฉด | 54.7 | 52.8 | 56.9 |
| ํ์ ๊ตฌ์ญ๋ช | ํ๊ท ์ฐ๋ น | ๋จ์ ํ๊ท ์ฐ๋ น | ์ฌ์ ํ๊ท ์ฐ๋ น | |
|---|---|---|---|---|
| 1 | ๊ฒฝ๊ธฐ๋ ๊ฐํ๊ตฐ | 50.3 | 49.1 | 51.6 |
| 8 | ๊ฒฝ๊ธฐ๋ ๊ณ ์์ | 42.9 | 42.0 | 43.9 |
| 56 | ๊ฒฝ๊ธฐ๋ ๊ณผ์ฒ์ | 41.5 | 40.4 | 42.5 |
| 63 | ๊ฒฝ๊ธฐ๋ ๊ด๋ช ์ | 42.7 | 41.6 | 43.8 |
| 83 | ๊ฒฝ๊ธฐ๋ ๊ด์ฃผ์ | 42.6 | 42.0 | 43.3 |
| ํ์ ๊ตฌ์ญ๋ช | ํ๊ท ์ฐ๋ น | ๋จ์ ํ๊ท ์ฐ๋ น | ์ฌ์ ํ๊ท ์ฐ๋ น | |
|---|---|---|---|---|
| 509 | ํ์ฃผ์ | 41.7 | 40.8 | 42.7 |
| 527 | ํํ์ | 40.9 | 40.0 | 41.9 |
| 553 | ํฌ์ฒ์ | 47.5 | 46.4 | 48.8 |
| 568 | ํ๋จ์ | 40.7 | 40.2 | 41.2 |
| 583 | ํ์ฑ์ | 38.1 | 37.7 | 38.5 |
| ์๊ตฐ๋ช | ๋ฑ๋ก๋๋ฌผ์ | ๋ฑ๋ก์์ ์์ | ๊ด๊ณต์ | ์๋ | ๊ฒฝ๋ | ์ด ์ธ๊ตฌ์ | 1000๋ช ๋น๋ง๋ฆฌ์ | 1์์ ์๋น๋ง๋ฆฌ์ | ํ์ ๊ตฌ์ญ๋ช | ํ๊ท ์ฐ๋ น | ๋จ์ ํ๊ท ์ฐ๋ น | ์ฌ์ ํ๊ท ์ฐ๋ น | |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 0 | ๊ฐํ๊ตฐ | 4017 | 2006.0 | ๊ฐํ๊ตฐ์ฒญ | 37.831318 | 127.509706 | 62168 | 64.62 | 2.00 | ๊ฐํ๊ตฐ | 50.3 | 49.1 | 51.6 |
| 1 | ๊ณ ์์ | 73477 | 54580.0 | ๊ณ ์์์ฒญ | 37.658422 | 126.831964 | 1079277 | 68.08 | 1.35 | ๊ณ ์์ | 42.9 | 42.0 | 43.9 |
| 2 | ๊ณผ์ฒ์ | 2974 | 2325.0 | ๊ณผ์ฒ์์ฒญ | 37.429812 | 126.986963 | 78301 | 37.98 | 1.28 | ๊ณผ์ฒ์ | 41.5 | 40.4 | 42.5 |
| 3 | ๊ด๋ช ์ | 20161 | 15698.0 | ๊ด๋ช ์์ฒญ | 37.479097 | 126.864846 | 290756 | 69.34 | 1.28 | ๊ด๋ช ์ | 42.7 | 41.6 | 43.8 |
| 4 | ๊ด์ฃผ์ | 29042 | 19368.0 | ๊ด์ฃผ์์ฒญ | 37.429433 | 127.255084 | 388893 | 74.68 | 1.50 | ๊ด์ฃผ์ | 42.6 | 42.0 | 43.3 |
| ๋ฑ๋ก๋๋ฌผ์ | ๋ฑ๋ก์์ ์์ | ๊ด๊ณต์ | ์๋ | ๊ฒฝ๋ | ์ด ์ธ๊ตฌ์ | 1000๋ช ๋น๋ง๋ฆฌ์ | 1์์ ์๋น๋ง๋ฆฌ์ | ํ๊ท ์ฐ๋ น | ๋จ์ ํ๊ท ์ฐ๋ น | ์ฌ์ ํ๊ท ์ฐ๋ น | |
|---|---|---|---|---|---|---|---|---|---|---|---|
| ์๊ตฐ๋ช | |||||||||||
| ํ์ฃผ์ | 24057 | 16584.0 | ํ์ฃผ์์ฒญ | 37.760041 | 126.779877 | 486515 | 49.45 | 1.45 | 41.7 | 40.8 | 42.7 |
| ํํ์ | 60468 | 43718.0 | ํํ์์ฒญ | 36.992300 | 127.112527 | 569369 | 106.20 | 1.38 | 40.9 | 40.0 | 41.9 |
| ํฌ์ฒ์ | 11168 | 5719.0 | ํฌ์ฒ์์ฒญ | 37.894701 | 127.200341 | 148469 | 75.22 | 1.95 | 47.5 | 46.4 | 48.8 |
| ํ๋จ์ | 17634 | 13085.0 | ํ๋จ์์ฒญ | 37.539057 | 127.215530 | 323558 | 54.50 | 1.35 | 40.7 | 40.2 | 41.2 |
| ํ์ฑ์ | 48264 | 35496.0 | ํ์ฑ์์ฒญ | 37.199415 | 126.831523 | 892038 | 54.11 | 1.36 | 38.1 | 37.7 | 38.5 |
| ๋ฑ๋ก๋๋ฌผ์ | ๋ฑ๋ก์์ ์์ | ์๋ | ๊ฒฝ๋ | ์ด ์ธ๊ตฌ์ | 1000๋ช ๋น๋ง๋ฆฌ์ | 1์์ ์๋น๋ง๋ฆฌ์ | ํ๊ท ์ฐ๋ น | ๋จ์ ํ๊ท ์ฐ๋ น | ์ฌ์ ํ๊ท ์ฐ๋ น | |
|---|---|---|---|---|---|---|---|---|---|---|
| ๋ฑ๋ก๋๋ฌผ์ | 1.000000 | 0.929165 | -0.258325 | -0.400649 | 0.801469 | 0.603257 | -0.320633 | -0.337281 | -0.335284 | -0.336903 |
| ๋ฑ๋ก์์ ์์ | 0.929165 | 1.000000 | -0.326905 | -0.404202 | 0.802641 | 0.444666 | -0.352341 | -0.355903 | -0.351853 | -0.354996 |
| ์๋ | -0.258325 | -0.326905 | 1.000000 | -0.054979 | -0.287853 | -0.132644 | 0.376955 | 0.531682 | 0.521886 | 0.535785 |
| ๊ฒฝ๋ | -0.400649 | -0.404202 | -0.054979 | 1.000000 | -0.406309 | 0.010427 | 0.624281 | 0.573513 | 0.594505 | 0.554759 |
| ์ด ์ธ๊ตฌ์ | 0.801469 | 0.802641 | -0.287853 | -0.406309 | 1.000000 | 0.084719 | -0.428738 | -0.529098 | -0.522676 | -0.530333 |
| 1000๋ช ๋น๋ง๋ฆฌ์ | 0.603257 | 0.444666 | -0.132644 | 0.010427 | 0.084719 | 1.000000 | 0.197501 | 0.184070 | 0.188544 | 0.180885 |
| 1์์ ์๋น๋ง๋ฆฌ์ | -0.320633 | -0.352341 | 0.376955 | 0.624281 | -0.428738 | 0.197501 | 1.000000 | 0.756414 | 0.785313 | 0.735683 |
| ํ๊ท ์ฐ๋ น | -0.337281 | -0.355903 | 0.531682 | 0.573513 | -0.529098 | 0.184070 | 0.756414 | 1.000000 | 0.996922 | 0.997771 |
| ๋จ์ ํ๊ท ์ฐ๋ น | -0.335284 | -0.351853 | 0.521886 | 0.594505 | -0.522676 | 0.188544 | 0.785313 | 0.996922 | 1.000000 | 0.989792 |
| ์ฌ์ ํ๊ท ์ฐ๋ น | -0.336903 | -0.354996 | 0.535785 | 0.554759 | -0.530333 | 0.180885 | 0.735683 | 0.997771 | 0.989792 | 1.000000 |